import request from '@/config/axios'

export interface PlanInfoVO {
  id: number
  htid: string
  jdh: string
  jdmc: string
  sfklx: string
  sfkfx: string
  yfje: number
  yfrq: localdate
  zffs: string
  fpfs: string
  jssj: Date
  khfzr: string
  bz: string
}

// 查询合同收付款计划表 分页
export const getPlanInfoPage = async (params) => {
  return await request.get({ url: `/cont/plan-info/page`, params })
}

// 查询合同收付款计划表 详情
export const getPlanInfo = async (id: number) => {
  return await request.get({ url: `/cont/plan-info/get?id=` + id })
}

// 新增合同收付款计划表 
export const createPlanInfo = async (data: PlanInfoVO) => {
  return await request.post({ url: `/cont/plan-info/create`, data })
}

// 修改合同收付款计划表 
export const updatePlanInfo = async (data: PlanInfoVO) => {
  return await request.put({ url: `/cont/plan-info/update`, data })
}

// 删除合同收付款计划表 
export const deletePlanInfo = async (id: number) => {
  return await request.delete({ url: `/cont/plan-info/delete?id=` + id })
}

// 导出合同收付款计划表  Excel
export const exportPlanInfo = async (params) => {
  return await request.download({ url: `/cont/plan-info/export-excel`, params })
}